/*
 * @Author: zxc
 * @Date: 2020-07-28 15:42:18
 * @LastEditTime: 2020-08-20 11:07:28
 * @LastEditors: zxc
 * @Description: 
 */ 
import {Dispatch} from 'redux'
import {ASYNC_SET_MENU} from '../actions/menu'
export const getMenuData =  () => {
  return async (dispatch:Dispatch) => {
    //在这边处理异步
    await setTimeout(() => console.log('我是thunk 异步的数据'), 2000);
    dispatch({
      type:ASYNC_SET_MENU,
      payload:'一个异步请求的数据'
    })
  }
}